X-Git-Url: https://git.r.bdr.sh/rbdr/super-polarity/blobdiff_plain/9899ae5d21c559b98386be48c5a80e63db10552d..95d7601b7742ed560a9d8e00269217f62fc7ce32:/Super%20Polarity/SuperPolarity.cs diff --git a/Super Polarity/SuperPolarity.cs b/Super Polarity/SuperPolarity.cs index 40f1477..c43582e 100644 --- a/Super Polarity/SuperPolarity.cs +++ b/Super Polarity/SuperPolarity.cs @@ -17,15 +17,20 @@ namespace SuperPolarity /// public class SuperPolarity : Game { - GraphicsDeviceManager graphics; + public static GraphicsDeviceManager graphics; SpriteBatch spriteBatch; + // Input Handler + KeyboardState currentKeyboardState; + GamePadState currentGamePadState; + MainShip player; public SuperPolarity() : base() { - graphics = new GraphicsDeviceManager(this); + SuperPolarity.graphics = new GraphicsDeviceManager(this); + SuperPolarity.graphics.PreferMultiSampling = true; Content.RootDirectory = "Content"; } @@ -53,7 +58,7 @@ namespace SuperPolarity Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2); - player.Initialize(Content.Load("Graphics\\player"), playerPosition); + player.Initialize(Content, Content.Load("Graphics\\main-ship"), playerPosition); } /// @@ -77,6 +82,9 @@ namespace SuperPolarity // TODO: Add your update logic here + InputController.UpdateInput(); + player.Update(gameTime); + base.Update(gameTime); } @@ -86,7 +94,7 @@ namespace SuperPolarity /// Provides a snapshot of timing values. protected override void Draw(GameTime gameTime) { - GraphicsDevice.Clear(Color.CornflowerBlue); + GraphicsDevice.Clear(Color.White); spriteBatch.Begin();